package xyz.lwm.lazycat.mybatisflex;

import xyz.lwm.lazycat.annotation.Import;
import xyz.lwm.lazycat.utility.reflect.AliasTo;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * mybatis flex mapper scan
 *
 * @author lwm
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Import(MybatisFlexConfiguration.MybatisFlexScannerRegistrar.class)
public @interface MapperScan {

    /**
     * mapper packages. <br>
     * 包名示例:   xyz.lwm.**.mapper
     */
    @AliasTo("value")
    String[] basePackages() default {};

    /**
     * mapper packages
     */
    @AliasTo("basePackages")
    String[] value() default {};

    /**
     * xml locations. <br>
     */
    // xml文件路径示例:   classpath:mapper/*.xml
    String[] xmlLocations() default  {};

}
